package com.cherrish.demo.redis;

import com.alibaba.fastjson.TypeReference;
import com.cherrish.demo.cache.CacheLoadback;
import com.cherrish.demo.cache.RedisCacheService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author cherrish
 * @time 2018-11-12 9:43
 * @name TestRedisCache
 * @desc:
 */
public class TestRedisCache {
    @Resource
    private RedisCacheService redisCacheService;
    public Object getData(){
        redisCacheService.findCache("key", 1000, new TypeReference<List<Long>>() {
        }, new CacheLoadback<List<Long>>() {
            @Override
            public List<Long> load() {
                return null;
            }
        });
        return null;
    }
}
